C++26リフレクションに対応#1607
Conversation
|
まだ大量に抜けがありそう |
|
これの取り消しに対応しないといけない |
|
@yohhoy @Raclamusi |
6d21c35 to
32cd88c
Compare
Co-authored-by: Raclamusi <61970673+Raclamusi@users.noreply.github.com>
cfe6abb to
741186c
Compare
…る必要がある Co-authored-by: Raclamusi <61970673+Raclamusi@users.noreply.github.com>
…必要がある Co-authored-by: Raclamusi <61970673+Raclamusi@users.noreply.github.com>
Co-authored-by: Raclamusi <61970673+Raclamusi@users.noreply.github.com>
Co-authored-by: Raclamusi <61970673+Raclamusi@users.noreply.github.com>
Co-authored-by: Raclamusi <61970673+Raclamusi@users.noreply.github.com>
Co-authored-by: Raclamusi <61970673+Raclamusi@users.noreply.github.com>
Co-authored-by: Raclamusi <61970673+Raclamusi@users.noreply.github.com>
Co-authored-by: Raclamusi <61970673+Raclamusi@users.noreply.github.com>
|
一旦、コミットを整理しつつ @Raclamusi さんの変更を取り込みました |
|
ページ数としては、一旦過不足がなくなったはず。 |
|
TODO : ハッシュ計算の例を書く。hash_combineはないので、とりあえずXORで |
|
いただいた指摘には一旦対応しましたが、reflection.mdでの解説を見直す必要があります。 |
|
対応したので、このあと一旦セルフレビュー |
|
一通り対応しました! |
|
この変更で |
|
直しました〜 |
|
GCC 16で使えるようなので、動作検証します |
|
GCC 16ですべて動作検証しました。一部未実装もあったので、[mark noimpl]をつけてあります。 |
|
|
|
consteval info current_function();
consteval info current_class();
consteval info current_namespace();
consteval bool is_applicable_type(info fn, info tuple);
consteval bool is_nothrow_applicable_type(info fn, info tuple);
consteval info apply_result(info fn, info tuple);
|
|
@Raclamusi |
|
GCCのコンパイルオプションを記載しました |
| template <class T> | ||
| consteval info reflect_constant(const T& value); |
There was a problem hiding this comment.
reflect_constant() の引数の型が const T& から T になったようです。
| // 型ごとに値を取り出して出力 | ||
| // アノテーションは値のリフレクションではないため、 | ||
| // constant_of()で値を取り出してからスプライスする | ||
| if constexpr (std::meta::type_of(a) == ^^Label) { |
There was a problem hiding this comment.
アノテーションの値が reflect_constant() で変換されるとき、テンプレート引数と同様に、クラス型には const が付きます。
https://eel.is/c++draft/temp.param#note-3
| if constexpr (std::meta::type_of(a) == ^^Label) { | |
| if constexpr (std::meta::type_of(a) == ^^const Label) { |
| ### 出力 | ||
| ``` | ||
| アノテーション数: 2 | ||
| 型: Label |
There was a problem hiding this comment.
| 型: Label | |
| 型: const Label |
一通り軽くチェックしたくらいなので、作業漏れチェックなどしてからマージします。